'use strict';
const db = uniCloud.database();
exports.main = async (event, context) => {
	const order = db.collection("order");
	let res = await order
	.aggregate()
	.match({
		"status":event.status
	})
	.sort({
		buy_time:-1  //-1降序  1升序
	})
	.end()
	return res;
};
